import request from '@/utils/request'

// 查询饮用记录列表
export function listDrink(query) {
  return request({
    url: '/record/drink/list',
    method: 'get',
    params: query
  })
}

// 查询饮用记录详细
export function getDrink(drinkId) {
  return request({
    url: '/record/drink/' + drinkId,
    method: 'get'
  })
}

// 新增饮用记录
export function addDrink(data) {
  return request({
    url: '/record/drink',
    method: 'post',
    data: data
  })
}

// 修改饮用记录
export function updateDrink(data) {
  return request({
    url: '/record/drink',
    method: 'put',
    data: data
  })
}

// 删除饮用记录
export function delDrink(drinkId) {
  return request({
    url: '/record/drink/' + drinkId,
    method: 'delete'
  })
}
